package com.nciae.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.nciae.po.TeacherSignIn;
import com.nciae.dao.TeacherSignInMapper;
import com.nciae.service.ITeacherSignInService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Guoliyu
 * @since 2022-03-30
 */
@Service
public class TeacherSignInServiceImpl extends ServiceImpl<TeacherSignInMapper, TeacherSignIn> implements ITeacherSignInService {

    @Override
    public void add(TeacherSignIn teacherSignIn) {
        baseMapper.insert(teacherSignIn);
    }

    @Override
    public List<TeacherSignIn> findAllById(Long id) {
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("teacher_id", id);
        return baseMapper.selectList(wrapper);
    }
}
